Image segmentation device and image segmentation method

ABSTRACT

An image segmentation method includes displaying, through a display component, an original designation region relative to an image; receiving a user input on the image, in which the user input is at least one stroke on the image; segmenting a regional area corresponding to the stroke to update the original designation region, in which the regional area at least partially overlaps with the original designation region.

RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application Ser.No. 61/949,366, filed Mar. 7, 2014, which is herein incorporated byreference.

BACKGROUND

Technical Field

The present disclosure relates to an electronic device and a method.More particularly, the present disclosure relates to an imagesegmentation device and an image segmentation method.

Description of Related Art

With advances in image processing technology, image segmentation methodshave been widely used.

A typical image segmentation method may be used to segment differentportions of an image. For example, in digital photography, an imagesegmentation method can be used to segment out a main object (i.e., aforeground) from a background of the image. With such an operation, themain object and the background can be processed separately.

SUMMARY

One aspect of the present disclosure is related to an image segmentationmethod. In accordance with one embodiment of the present disclosure, theimage segmentation method includes displaying, through a displaycomponent, an original designation region relative to an image;receiving a user input on the image, in which the user input is at leastone stroke on the image; segmenting a regional area corresponding to thestroke to update the original designation region, in which the regionalarea at least partially overlaps with the original designation region.

In accordance with one embodiment of the present disclosure, the imagecomprises a plurality of pixels, and the regional area is extended frompixels passed by the stroke for an extended width.

In accordance with one embodiment of the present disclosure, theextended width corresponds to the length of the stroke.

In accordance with one embodiment of the present disclosure, the step ofsegmenting the regional area corresponding to the stroke to update theoriginal designation region includes calculating the extended widthaccording to the stroke and the original designation region, so as tocause the regional area to at least partially overlap with the originaldesignation region.

In accordance with one embodiment of the present disclosure, the step ofsegmenting the regional area corresponding to the stroke to update theoriginal designation region includes determining the regional areacorresponding to the stroke; generating a plurality of seedscorresponding to the stroke, the regional area, and the originaldesignation region; and segmenting the regional area according to theseeds to update the original designation region to generate an updateddesignation region.

In accordance with one embodiment of the present disclosure, the step ofupdating the original designation region according to the seeds includesperforming an image segmentation algorithm within the regional areaaccording to foreground seeds and background seeds from among the seedsand the image to update the original designation region.

In accordance with one embodiment of the present disclosure, all ofpixels passed by the stroke are either within the updated designationregion or outside the updated designation region according to whetherthe stroke is a background stroke or a foreground stroke.

In accordance with one embodiment of the present disclosure, at leastone pixel passed by the stroke and at least one pixel located around theregional area are taken as the seeds.

In accordance with one embodiment of the present disclosure, pixelsaround the regional area are taken as foreground seeds or backgroundseeds according to whether the original designation region is used toselect a foreground or a background of the image.

In accordance with one embodiment of the present disclosure, pixelspassed by the stroke are taken as foreground seeds or background seedsaccording to whether the stroke is a foreground stroke or a backgroundstroke.

Another aspect of the present disclosure relates to an imagesegmentation device. In accordance with one embodiment of the presentdisclosure, the image segmentation device includes a display component,a user input interface, and a processing component. The displaycomponent is configured for displaying an original designation regionrelative to an image. The user input interface is configured forreceiving a user input on the image, in which the user input is at leastone stroke on the image. The processing component is configured forsegmenting a regional area corresponding to the stroke to update theoriginal designation region, in which the regional area at leastpartially overlaps with the original designation region.

In accordance with one embodiment of the present disclosure, the imagecomprises a plurality of pixels, and the regional area is extended frompixels passed by the stroke for an extended width.

In accordance with one embodiment of the present disclosure, theextended width corresponds to the length of the stroke.

In accordance with one embodiment of the present disclosure, theprocessing component is further configured for calculating the extendedwidth according to the stroke and the original designation region, so asto cause the regional area to at least partially overlap with theoriginal designation region.

In accordance with one embodiment of the present disclosure, theprocessing component is further configured for determining the regionalarea corresponding to the stroke; generating a plurality of seedscorresponding to the stroke, the regional area, and the originaldesignation region; and segmenting the regional area according to theseeds to update the original designation region to generate an updateddesignation region.

In accordance with one embodiment of the present disclosure, theprocessing component is further configured for performing an imagesegmentation algorithm within the regional area according to foregroundseeds and background seeds from among the seeds and the image to updatethe original designation region.

In accordance with one embodiment of the present disclosure, all ofpixels passed by the stroke are either within the updated designationregion or outside the updated designation region according to whetherthe stroke is a background stroke or a foreground stroke.

In accordance with one embodiment of the present disclosure, at leastone pixel passed by the stroke and at least one pixel located around theregional area are taken as the seeds.

In accordance with one embodiment of the present disclosure, pixelsaround the regional area are taken as foreground seeds or backgroundseeds according to whether the original designation region is used toselect a foreground or a background of the image.

In accordance with one embodiment of the present disclosure, pixelspassed by the stroke are taken as foreground seeds or background seedsaccording to whether the stroke is a foreground stroke or a backgroundstroke.

Through an application of one embodiment described above, the originaldesignation region can be adjusted within a regional area correspondingto the stroke. With such an operation, precise image segmentation can berealized.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention can be more fully understood by reading the followingdetailed description of the embodiment, with reference made to theaccompanying drawings as follows.

FIG. 1 is a schematic diagram of an image segmentation device inaccordance with one embodiment of the present disclosure.

FIG. 2 is a flowchart of an image segmentation method in accordance withone embodiment of the present disclosure.

FIGS. 3A and 3B illustrate an operative example of an image segmentationmethod in accordance with one embodiment of the present disclosure.

FIG. 4 illustrates sub-steps of one step in the image segmentationmethod in FIG. 2 in accordance with one embodiment of the presentdisclosure.

FIGS. 5A-5E illustrate another operative example of an imagesegmentation method in accordance with one embodiment of the presentdisclosure.

DETAILED DESCRIPTION

Reference will now be made in detail to the present embodiments of theinvention, examples of which are illustrated in the accompanyingdrawings. Wherever possible, the same reference numbers are used in thedrawings and the description to refer to the same or like parts.

It will be understood that, in the description herein and throughout theclaims that follow, when an element is referred to as being “connected”or “coupled” to another element, it can be directly connected or coupledto the other element or intervening elements may be present. Incontrast, when an element is referred to as being “directly connected”or “directly coupled” to another element, there are no interveningelements present. Moreover, “electrically connect” or “connect” canfurther refer to the interoperation or interaction between two or moreelements.

It will be understood that, in the description herein and throughout theclaims that follow, although the terms “first,” “second,” etc. may beused to describe various elements, these elements should not be limitedby these terms. These terms are only used to distinguish one elementfrom another. For example, a first element could be termed a secondelement, and, similarly, a second element could be termed a firstelement, without departing from the scope of the embodiments.

It will be understood that, in the description herein and throughout theclaims that follow, the terms “comprise” or “comprising,” “include” or“including,” “have” or “having,” “contain” or “containing” and the likeused herein are to be understood to be open-ended, i.e., to meanincluding but not limited to.

It will be understood that, in the description herein and throughout theclaims that follow, the phrase “and/or” includes any and allcombinations of one or more of the associated listed items.

It will be understood that, in the description herein and throughout theclaims that follow, words indicating direction used in the descriptionof the following embodiments, such as “above,” “below,” “left,” “right,”“front” and “back,” are directions as they relate to the accompanyingdrawings. Therefore, such words indicating direction are used forillustration and do not limit the present disclosure.

It will be understood that, in the description herein and throughout theclaims that follow, unless otherwise defined, all terms (includingtechnical and scientific terms) have the same meaning as commonlyunderstood by one of ordinary skill in the art to which this inventionbelongs. It will be further understood that terms, such as those definedin commonly used dictionaries, should be interpreted as having a meaningthat is consistent with their meaning in the context of the relevant artand will not be interpreted in an idealized or overly formal senseunless expressly so defined herein.

Any element in a claim that does not explicitly state “means for”performing a specified function, or “step for” performing a specificfunction, is not to be interpreted as a “means” or “step” clause asspecified in 35 U.S.C. §112(f). In particular, the use of “step of” inthe claims herein is not intended to invoke the provisions of 35 U.S.C.§ 112(f).

One aspect of the present disclosure is related to an image segmentationdevice. In the paragraphs below, a smart phone or a tablet computer willbe taken as an example to describe details of the image segmentationdevice. However, the present disclosure is not limited in this regard.

FIG. 1 is a schematic diagram of an image segmentation device 100 inaccordance with one embodiment of the present disclosure. In thisembodiment, the image segmentation device 100 includes a processingcomponent 110, a display component 120, and a user input interface 130.In one embodiment, the processing component 110 is electricallyconnected to the display component 120 and the user input interface 130.

In one embodiment, the processing component 110 can be realized by, forexample, a processor, such as a central processor, a microprocessor, ora digital signal processor (DSP), but is not limited in this regard. Thedisplay component 120 can be realized by, for example, a display, suchas a liquid crystal display, an active matrix organic light emittingdisplay (AMOLED), or an e-paper display, but is not limited in thisregard. The user input interface 130 can be realized by, for example, atouch sensing module, a keyboard, or a mouse, but is not limited in thisregard. In one embodiment, the display component 120 and the user inputinterface 130 can be integrated as a touch display component, but thepresent disclosure is not limited to such an embodiment.

In one embodiment, the display component 120 is configured to display animage and an original designation region. The user input interface 130is configured to receive an input by a user relative to the image andthe original designation region. The processing component 110 isconfigured to segment a regional area corresponding to the input toupdate the original designation region.

Details of the present disclosure are described in the paragraphs belowwith reference to an image segmentation method in FIG. 2. However, thepresent disclosure is not limited to the embodiment below.

It should be noted that the image segmentation method can be applied toan image segmentation device having a structure that is the same as orsimilar to the structure of the image segmentation device 100 shown inFIG. 1. To simplify the description below, in the following paragraphs,the embodiment shown in FIG. 1 will be used as an example to describethe image segmentation method according to an embodiment of the presentdisclosure. However, the present disclosure is not limited toapplication to the embodiment shown in FIG. 1.

In addition, it should be noted that in the steps of the following imagesegmentation method, no particular sequence is required unless otherwisespecified. Moreover, the following steps also may be performedsimultaneously or the execution times thereof may at least partiallyoverlap.

Furthermore, the steps of the following image segmentation method may beadded to, replaced, and/or eliminated as appropriate, in accordance withvarious embodiments of the present disclosure.

Reference is made to FIG. 2. The image segmentation method 200 includesthe steps below.

In step S1, the processing component 110 utilizes the display component120 to display an original designation region relative to an image. Inone embodiment, the original designation region may be designated by auser or generated by performing a preliminary image segmenting processon the image, but is not limited in this regard. In one embodiment, theimage includes a plurality of pixels, and the original designationregion selects a first portion of the pixels of the image. In oneembodiment, the original designation region may be used to select aforeground of the image. However, in another embodiment, the originaldesignation region may be used to select a background of the image.

In step S2, the processing component 110 utilizes the user inputinterface 120 to receive an input provided by a user on the image. Inone embodiment, the input may be at least one stroke (e.g., a straightline, a curve, or a dot), but is not limited in this regard. In order tosimplify the description, a stroke will be taken as a descriptiveexample in the paragraphs below, but the disclosure is not limited tosuch an embodiment.

In one embodiment the user may provide the stroke by using a finger, astylus, a mouse, or a keyboard, but the disclosure is not limited inthis regard. In one embodiment, the stroke may be provided on at leastone of the pixels of the image.

In step S3, the processing component 110 segments a regional area whichis generated corresponding to the stroke to update the originaldesignation region to generate an updated designation region, andcontrols the display component 120 to display the updated designationregion. In this embodiment, the segmenting is limited within theregional area corresponding to the stroke, in which the regional area issmaller than the image, such that the original designation region can beadjusted regionally. In one embodiment, the regional area is locatedaround the stroke. In one embodiment, the processing component 110segments the regional area according to a part of the image (e.g., thecolors of the part of the image) within the regional area. In oneembodiment, the regional area at least partially overlaps with theoriginal designation region. In one embodiment, the updated designationregion selects a second portion of the pixels of the image. In oneembodiment, an image segmentation algorithm may be applied within theregional area according to the stroke, so as to update the originaldesignation region.

In step S4, after the updated designation region is generated, theprocessing component 110 segments the image according to the updateddesignation region. In one embodiment, the processing component 110 maysegment out the image selected by the updated designation region toobtain at least one segmented region. In one embodiment, the at leastone segmented region may serve as a foreground of the image, and theremaining region may serve as a background of the image. In a differentembodiment, the at least one segmented region may serve as a backgroundof the image, and the remaining region may serve as a foreground of theimage.

It should be noted that, in some embodiments, step S4 may be omitted,and the processing component 110 may update the updated designationregion again (or iteratively) according to a new input provide by theuser before the image is segmented.

In some approaches, a stroke may affect the entire original designationregion. In this case, it is not possible to adjust the originaldesignation region precisely, causing inconvenience to a user.Additionally, in such a case, segmenting the entire image iscomputationally expensive.

However, with the operations in one embodiment of the present disclosuredescribed above, the original designation region can be adjustedregionally, such that precise image segmentation can be realized. Inaddition, with the operations in one embodiment of the presentdisclosure, only the regional area is needed to be segmented, such thatthe computation of the segmenting can be decreased.

To allow the disclosure to be more fully understood, an operativeexample is described in the paragraphs below, but the present disclosureis not limited to the example below.

Reference is made to FIGS. 3A and 3B. In this embodiment, an image IMGmay be presented on the display component 120. The image IMG has abackground BK and an object (i.e., a foreground) OBJ, in which theobject OBJ is shown by the gray area in the image IMG. An originaldesignation region DSR is presented on the image IMG, in which aboundary of the original designation region DSR is indicated as the boldline in the image IMG and is substantially located between the objectOBJ and background BK of the image IMG.

There are two mismatch regions MMR1 MMR2 between the object OBJ and theoriginal designation region DSR, in which the mismatch region MMR1 is aportion of the object OBJ not covered by the original designation regionDSR, and the mismatch region MMR2 is a portion of background BK of theimage IMG which is inappropriately covered by the original designationregion DSR.

In this case, a user may draw a foreground stroke STK1 on the mismatchregion MMR1 to adjust (i.e. to increase) the original designation regionDSR within a regional area ADR1 around the stroke STK1 and to therebygenerate a first updated designation region. Subsequently, the user maydraw a background stroke STK2 on the mismatch region MMR2 to adjust(i.e., to decrease) the first updated designation region within aregional area ADR2 around the stroke STK2 and to thereby generate asecond updated designation region. Through such an operation, theoriginal designation region can be adjusted regionally.

In one embodiment, when the adjusting of the original designation regionDSR corresponding to the stroke STK1 is finished, the display component120 stops displaying the stroke STK1, so that the user can draw thestroke STK2 without interference of the stroke STK1, but the presentdisclosure is not limited in this regard. In one embodiment, theadjusting corresponding to the stroke STK2 is relevant only the imageIMG, the stroke STK2, and the first updated designation region, and isirrelevant to the previous stroke STK1, but the present disclosure isnot limited in this regard.

Reference is now made to FIG. 4, which illustrates sub-steps S31-S33 ofstep S3 in the image segmentation method 200 in accordance with oneembodiment of the present disclosure.

In step S31, the processing component 110 determines the regional areacorresponding to the stroke. In one embodiment, the regional area isextended from the pixels passed by the stroke for w pixels, where w isan integer. In one embodiment, w corresponds to the length of thestroke. The longer the stroke, the greater the value of w, and viceversa. Through such operation, the user can adjust the originaldesignation region by a large amount with a long stroke, and adjust theoriginal designation region by a small amount with a short stroke or adot. Additionally, in another embodiment, the processing component 110can calculate the extended width w according to the stroke and theoriginal designation region, so as to cause the regional area to atleast partially overlap with the original designation region. In stillanother embodiment, the extended width w may be a predetermined value.

In step S32, after the regional area is determined, the processingcomponent 110 generates a plurality of seeds corresponding to thestroke, the regional area, and the original designation region. In oneembodiment, the pixels passed by the stroke and the pixels around theregional area may be taken as the seeds.

In one embodiment, the seeds include foreground seeds and backgroundseeds. The pixels passed by the stroke are taken as foreground seeds orbackground seeds according to whether the stroke is a foreground strokeor a background stroke. For example, when the stroke is a backgroundstroke, the pixels passed by the background stroke are taken as thebackground seeds. When the stroke is a foreground stroke, the pixelspassed by the foreground stroke are taken as the foreground seeds.

In addition, the pixels around the regional area and within the originaldesignation region are taken as the foreground seeds or the backgroundseeds according to whether the original designation region is used toselect a foreground or a background of the image. Also, the pixelsaround the regional area and outside the original designation region aretaken as the foreground seeds or the background seeds according towhether the original designation region is used to select a foregroundor a background of the image.

For example, when the original designation region is used to select aforeground of the image, the pixels around the regional area and withinthe original designation region are taken as the foreground seeds, andthe pixels around the regional area and outside the original designationregion are taken as the background seeds. When the original designationregion is used to select a background of the image, the pixels aroundthe regional area and within the original designation region are takenas the background seeds, and the pixels around the regional area andoutside the original designation region are taken as the foregroundseeds.

In step S33, after the seeds are generated, the processing component 110segments the regional area according to the seeds to update the originaldesignation region to generate an updated designation region. In oneembodiment, the processing component 110 performs an image segmentationalgorithm within the regional area according to the background seeds,the foreground seeds, and a part of the image (e.g. the colors of thepart of the image) within the regional area to update the originaldesignation region. In one embodiment, the image segmentation algorithmmay be a graph cut algorithm, but is not limited in this regard. Itshould be noted that the graph cut algorithm is configured to receiveforeground and background seeds provided by a user, in order to select aforeground or a background of an image according to the color of theimage and the foreground and background seeds. Thus, by performing thegraph cut algorithm, a foreground or a background of the image in theregional area can be determined.

In one embodiment, all of the pixels passed by the stroke are eitherwithin the updated designation region or outside the updated designationregion according to the whether the stroke is a background stroke or aforeground stroke and whether the updated designation region is used toselect a foreground of the image or a background of the image.

For example, when the stroke is a background stroke and the updateddesignation region is used to select a foreground of the image, all ofthe pixels passed by the background stroke are outside the updateddesignation region. When the stroke is a background stroke and theupdated designation region is used to select a background of the image,all of the pixels passed by the background stroke are inside the updateddesignation region. When the stroke is a foreground stroke and theupdated designation region is used to select a foreground of the image,all of the pixels passed by the background stroke are within the updateddesignation region. When the stroke is a foreground stroke and theupdated designation region is used to select a background of the image,all of the pixels passed by the background stroke are outside theupdated designation region.

In one embodiment, the determination of the regional area (i.e., theoperation in step S31) can be performed by a region extension module 112in the processing component 110, the generation of the seeds (i.e., theoperation in step S32) can be performed by a seed generation module 114in the processing component 110, and the update of the originaldesignation region (i.e., the operation in step S33) can be performed byan update module 116 in the processing component 110, but the presentdisclosure is not limited to such an embodiment.

To allow the disclosure to be more fully understood, an operativeexample is described in the paragraphs below, but the present disclosureis not limited to the example below.

Reference is made to FIGS. 5A and 5E. Initially, an original designationregion DSR is presented on the image IMG as shown in FIG. 5A.Subsequently, a stroke STK3 may be provided on the image IMG as shown inFIG. 5B.

Next, a regional area ADR3 may be determined around the stroke STK3, inwhich the regional area ADR3 is extended from the pixels passed by thestroke STK3 for w pixels as shown in FIG. 5C. In this case, w is equalto 3.

Next, background seeds (labeled “B”) and foreground seeds (labeled “F”)may be generated according to the stroke STK3 and the regional area ADR3as shown in FIG. 5D. In this case, since the stroke STK3 is a backgroundstroke and the original designation region DSR is used to select aforeground of the image IMG, the pixels passed by the stroke STK3 aretaken as the background seeds, the pixels around the regional area ADR3and within the original designation region DSR are taken as theforeground seeds, and the pixels around the regional area ADR3 andoutside the original designation region DSR are taken as the backgroundseeds.

Subsequently, according to the foreground seeds and the background seedsand the image IMG, a portion of the original designation region DSRwithin the regional area ADR3 can be adjusted, such that an updateddesignation region FDR can be generated as shown in FIG. 5E. It shouldbe noted that the pixels passed by the stroke STK3 are excluded from theupdated designation region FDR. In other words, the regional area ADR3is segmented according to the foreground seeds and the background seedsand the image IMG to update the original designation region DSR togenerate the updated designation region FDR shown in FIG. 5E.

Through such an operation, the original designation region can beadjusted regionally, such that precise image segmentation can berealized.

Although the present invention has been described in considerable detailwith reference to certain embodiments thereof, other embodiments arepossible. Therefore, the scope of the appended claims should not belimited to the description of the embodiments contained herein.

What is claimed is:
 1. An image segmentation method comprising:displaying, through a display component, an original designation regionrelative to an image, wherein the image comprises a plurality of pixels;after the original designation region is displayed, sensing a stroke onthe image, wherein the stroke passes through a plurality of pixels ofthe image; after the stroke on the image is sensed, determining aregional area according to stroke information corresponding to thestroke on the image, wherein the regional area at least partiallyoverlaps with the original designation region: generating a plurality ofseeds corresponding to the stroke, the regional area, and the originaldesignation region, wherein the seeds comprise foreground seeds andbackground seeds; if the stroke is a background stroke, the pixelspassed by the background stroke are the background seeds; if the strokeis a foreground stroke, the pixels passed by the foreground stroke arethe foreground seeds; if the original designation region is used toselect a foreground, the pixels around the regional area and within theoriginal designation region are the foreground seeds, and the pixelsaround the regional area and outside the original designation region arethe background seeds; if the original designation region is used toselect a background, the pixels around the regional area and within theoriginal designation region are the background seeds, and the pixelsaround the regional area and outside the original designation region arethe foreground seeds; and the pixels in the regional area not passed bythe stroke are not classified as the foreground seeds or the backgroundseeds; performing a segmentation within the regional area according tothe seeds to update the original designation region; wherein under afirst condition, the segmentation within the regional area is performedto increase an area of the original designation region within theregional area, and wherein under a second condition, the segmentationwithin the regional area is performed to decrease the area of theoriginal designation region within the regional area; and wherein theregional area is determined according to the stroke by extending theregional area from the pixels passed by the stroke for w pixels, whereinw is an integer and is directly proportional to a length of the stroke.2. The image segmentation method as claimed in claim 1, wherein thesegmentation is a graph cut algorithm and is performed according to theseeds.
 3. The image segmentation method as claimed in claim 1, whereinall of pixels passed by the stroke are either within the updateddesignation region or outside the updated designation region accordingto whether the stroke is the background stroke or the foreground stroke.4. An image segmentation device comprising: a display componentconfigured for displaying an original designation region relative to animage, wherein the image comprises a plurality of pixels; a user inputinterface configured for sensing a stroke on the image after theoriginal designation region is displayed, wherein the stroke passesthrough a plurality of pixels of the image; and a processing componentconfigured for: determining a regional area according to strokeinformation corresponding to the stroke on the image, wherein theregional area at least partially overlaps with the original designationregion; generating a plurality of seeds corresponding to the stroke, theregional area, and the original designation region, wherein the seedscomprise foreground seeds and background seeds; if the stroke is abackground stroke, the pixels passed by the background stroke are thebackground seeds: if the stroke is a foreground stroke, the pixelspassed by the foreground stroke are the foreground seeds; if theoriginal designation region is used to select a foreground, the pixelsaround the regional area and within the original designation region arethe foreground seeds, and the pixels around the regional area andoutside the original designation region are the background seeds; if theoriginal designation region is used to select a background, the pixelsaround the regional area and within the original designation region arethe background seeds, and the pixels around the regional area andoutside the original designation region are the foreground seeds: andthe pixels in the regional area not passed by the stroke are notclassified as the foreground seeds or the background seeds; performing asegmentation within the regional area according to the seeds to updatethe original designation region, wherein under a first condition, thesegmentation within the regional area is performed to increase an areaof the original designation region within the regional area, whereinunder a second condition, the segmentation within the regional area isperformed to decrease the area of the original designation region withinthe regional area, wherein the regional area is determined according tothe stroke by extending the regional area from the pixels passed by thestroke for w pixels, wherein w is an integer and is directlyproportional to a length of the stroke.
 5. The image segmentation deviceas claimed in claim 4, wherein the segmentation is a graph cut algorithmand is performed according to the seeds.
 6. The image segmentationdevice as claimed in claim 4, wherein all of pixels passed by the strokeare either within the updated designation region or outside the updateddesignation region according to whether the stroke is the backgroundstroke or the foreground stroke.
 7. An image segmentation methodcomprising: displaying, through a display component, an originaldesignation region relative to an image, wherein the image comprises aplurality of pixels; sensing a stroke on the image; determining aregional area according to stroke information corresponding to thestroke on the image, wherein the original designation region at leastpartially overlaps with the regional area; and generating a plurality ofseeds corresponding to the stroke, the regional area, and the originaldesignation region, wherein the seeds comprise foreground seeds andbackground seeds; if the stroke is a background stroke, the pixelspassed by the background stroke are the background seeds; if the strokeis a foreground stroke, the pixels passed by the foreground stroke arethe foreground seeds; if the original designation region is used toselect a foreground, the pixels around the regional area and within theoriginal designation region are the foreground seeds, and the pixelsaround the regional area and outside the original designation region arethe background seeds; if the original designation region is used toselect a background, the pixels around the regional area and within theoriginal designation region are the background seeds, and the pixelsaround the regional area and outside the original designation region arethe foreground seeds, and the pixels in the regional area not passed bythe stroke are not classified as the foreground seeds or the backgroundseeds; performing a segmentation within the regional area according tothe seeds to update a contour of the original designation region withinthe regional area to generate an updated designation region, wherein aportion of pixels in the regional area are located inside the updateddesignation region, while another portion of pixels in the regional areaare located outside the updated designation region.